local ymh_eat_marble = Class(function(self, inst)
    self.inst = inst
    self.val = net_smallbyte(inst.GUID, "ymh_eat_marble.val",'ymh_eat_marble_val_change')
end)

function ymh_eat_marble:SetVal(num)
    if self.inst.components.ymh_eat_marble then
        num = num or 0
        self.val:set(num)
    end
end

function ymh_eat_marble:GetVal()
    return self.val:value()
end

function ymh_eat_marble:IsMax()
    return self:GetVal() >= TUNING.MOD_YUEMIHENG.EAT_MARBLE.MAX
end

return ymh_eat_marble